# coding: utf-8
import codecs
import hashlib
import time,threading
import wx
import math
import os,sys
import sqlite3
import logging
from threading import Thread
from wx.lib.pubsub import pub

info={"ThreadRun":False,
    "dircount":0,"filecount":0,
    "filelist":[],'complete':0,
    "path":"",'root':"D:/bakup"}

logging.basicConfig(level=logging.DEBUG,format='%(asctime)s -%(levelname)s -%(process)d -%(module)s -%(funcName)s -%(message)s')
db=sqlite3.connect(info['root']+"/sha256sum.db",check_same_thread=False)

def CheckFile():
    logfile=os.path.join(info['root'],"sha256sum.log")
    if(os.path.isfile(logfile)):
        file= codecs.open(logfile,"r","utf-8")
        for l in file.readlines():
            logging.debug(l.strip())
            logging.debug(l[:19])
            logging.debug(l[20:84])
            logging.debug(l[85:].rstrip())
    else:
        logging.debug("not found file!")

CheckFile()